#include "DrawableObject.h"


DrawableObject::DrawableObject(char * couleur):_effect(NULL),_englobant(NULL),_invalidEnglobant(true),_couleur(couleur)
{
}


DrawableObject::~DrawableObject()
{
	if(_englobant!=NULL)
		delete _englobant;
}

void DrawableObject::Paint(wxDC &dc)
{
	dc.SetBrush(wxBrush(wxColour(_couleur)));
}

GameRectangle & DrawableObject::Englobant()
{
	if(_englobant==NULL || _invalidEnglobant)
		CalculerEnglobant();
	return *_englobant;
}
